Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support local compilation cache in disc backend #20

Open
wants to merge 4 commits into
base: acc
Choose a base branch
from

Conversation

Yancey1989
Copy link

Support compilation result Serialize and Deserialize.

Copy link

@anw90 anw90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add some ut for this pr to check if the caching works

for (auto device : computation->devices()) {
result_pb.add_devices(device);
}
return hlo_proto.SerializeAsString() + ":::" + result_pb.SerializeAsString();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could use absl::strcat to concat the strings.

@@ -98,7 +99,14 @@ DISCComplationResult Compile(mlir::ModuleOp &module,
res.ral_mate_pb = ReadFileBytes(absl::StrCat(output_fname, ".pbtxt"));
res.inputs = inputs;
res.outputs = outputs;

DISCCompileResult result;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this redundant code.

@@ -405,6 +407,71 @@ size_t DISCComputationClient::GetNumDevices() const { return world_size_; }
int DISCComputationClient::GetProcessIndex() const { return local_rank_; }

int DISCComputationClient::GetNumProcesses() const { return world_size_; }
std::string DISCComputationClient::SerializeComputation(
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some blank lines between functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants